export default {
    addTags(state, path) {
        //添加tagsview+
        let flag = false
        flag = state.tags.some(e => e === path)
        if (!flag) {
            state.tags.push(path)
        }
    },
    removeTags(state, path) {
        //移除标签
        state.tags.forEach((e, i) => {
            if (e === path) {
                state.tags.splice(i, 1)
                return
            }
        });
    },
    crearTags(state) { //退出登录时清除标签
        state.tags = []
    }
}